package com.xbongbong.saas.model.impl;

import com.xbongbong.saas.constant.BasicConstant;
import com.xbongbong.saas.domain.dao.ExpressInformationDao;
import com.xbongbong.saas.domain.entity.ExpressInformationEntity;
import com.xbongbong.saas.domain.entity.SelectedExpressEntity;
import com.xbongbong.saas.model.ExpressInformationModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

;

/**
 * @author bomfish
 */
@Service
public class ExpressInformationModelImpl implements ExpressInformationModel {
    @Resource
    private ExpressInformationDao expressInformationDao;

    @Override
    public Long insert(ExpressInformationEntity entity) {
        return expressInformationDao.insert(entity);
    }

    @Override
    public void insertBatch(List<ExpressInformationEntity> list) {
        expressInformationDao.insertBatch(list);
    }

    @Override
    public List<ExpressInformationEntity> findEntities(Map<String, Object> param) {
        return expressInformationDao.findEntities(param);
    }

    @Override
    public Integer getEntityCount(Map<String, Object> param) {
        return expressInformationDao.getEntitiesCount(param);
    }

    @Override
    public void update(ExpressInformationEntity entity) {
        expressInformationDao.update(entity);
    }

    @Override
    public ExpressInformationEntity getByKey(Long key, String corpid) {
        return expressInformationDao.getByKey(key, corpid);
    }

    @Override
    public void updateBatchDel(List<Long> list, String corpid) {
        expressInformationDao.updateBatchDel(list,corpid);
    }

    /**
     * 批量更新
     * @param list 主键id集合
     * @param corpid
     */
    @Override
    public void updateBatch(List<ExpressInformationEntity> list, String corpid) {
        expressInformationDao.updateBatch(list, corpid);
    }

    @Override
    public ExpressInformationEntity getByCode(String corpid, String expressCode) {

        return expressInformationDao.getByCode(corpid, expressCode);
    }

}
